﻿
namespace Vixen.Substructure
{
    /// <summary>Encapsulates variables and methods used for number counting.</summary>
    public static class Counter
    {
        private static readonly object SyncObject = new object(); // Object to prevent cross-threading
        private static uint _spriteUIDCounter;

        /// <summary>Returns the next available Sprite UID value.</summary>
        public static uint GetSpriteUID()
        {
            lock (SyncObject)
            {
                _spriteUIDCounter++;
                return _spriteUIDCounter;
            }
        }
    }
}
